Returns an
IList of all persistent objects matching
the conditions that are found in the storage.
Syntax
| Visual Basic (Declaration) | |
|---|
Overloads Public Overridable Function FindAll( _
ByVal list As IList(Of T), _
ByVal conditions As String, _
ByVal ParamArray parameters() As Object _
) As IList(Of T) |
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As ObjectSearcher(Of T)
Dim list As IList(Of T)
Dim conditions As String
Dim parameters() As Object
Dim value As IList(Of T)
value = instance.FindAll(list, conditions, parameters)
|
| Managed Extensions for C++ | |
|---|
public: virtual IList<T>* FindAll(
IList<T>* list,
string* conditions,
params Object*[]* parameters
) |
Parameters
- list
- A class that implements the
IList interface is populated with the
result of the search.
- conditions
- A condition string that specifies the objects that are loaded.
- parameters
- A list of parameters that is passed as parameters for the conditions.
Return Value
Returns the
IList with the
objects returned by the search.
Example
The example shows how this method is used in your application code.
| C# | Copy Code |
|---|
[Persistent("USER")] public class User { private string _name = null; [Field("NAME")] public string Name { get { return _name; } set { _name = value; } } // ... Other properties and fields. } // ... Other code // Get the ObjectSearcher for User. ObjectSearcher<User> searcher = context.GetObjectSearcher<User>(); // Find only those with a given name by using conditions. IList<User> = searcher.FindAll(new List<User>, "Name like {0} SortBy Name Asc", "%mith%"); |
Requirements
Platforms: Windows 2000, Windows XP family, Windows Server 2003 family, Windows Vista family
See Also